package com.hs.sentinelr.componet;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 注册拦截器
 *
 * @Author lingNan
 * @Date 2021/8/22 10:04 下午
 **/
@Component
public class InteceptorConfig implements WebMvcConfigurer {

    @Resource
    private AccessLimitIntercepter accessLimitIntercepter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(accessLimitIntercepter);
    }
}
